<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!-- 移动设备 viewport -->
    <meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no,minimal-ui">
    <meta name="renderer" content="webkit">
    <meta name="description" content="系统后台"/>
    <link rel="stylesheet" href="${base}/assets/plugins/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="${base}/assets/plugins/animate.css/animate.min.css">
    <link rel="stylesheet" href="${base}/assets/plugins/font-awesome/css/font-awesome.min.css" charset="UTF-8">

    <link rel="stylesheet" href="${base}/assets/plugins/bootstrap-iconpicker/css/bootstrap-iconpicker.min.css">
    <link rel="stylesheet" href="${base}/assets/plugins/bootstrap-switch/css/bootstrap3/bootstrap-switch.min.css">
    <link rel="stylesheet" href="${base}/assets/plugins/bootstrap-sweetalert/sweetalert.css">
    <link rel="stylesheet" href="${base}/assets/plugins/bootstrap-datepicker/css/bootstrap-datepicker3.min.css">
    <link rel="stylesheet" href="${base}/assets/plugins/toastr/toastr.min.css">
    <link rel="stylesheet" href="${base}/assets/plugins/alertify/css/alertify.min.css">
    <link rel="stylesheet" href="${base}/assets/plugins/alertify/css/themes/bootstrap.min.css">
    <link rel="stylesheet" href="${base}/assets/plugins/icheck/skins/all.css">
    <link rel="stylesheet" href="${base}/assets/plugins/zTree/css/zTreeStyle/zTreeStyle.css">
    <link rel="stylesheet" href="${base}/assets/plugins/multi-select/css/multi-select.css">
    <link rel="stylesheet" href="${base}/assets/plugins/select2/css/bootstrap.min.css">
    <link rel="stylesheet" href="${base}/assets/plugins/bootstrap-select/css/bootstrap-select.min.css">
    <link rel="stylesheet" href="${base}/assets/plugins/summernote/summernote.css">
    <link rel="stylesheet" href="${base}/assets/plugins/swiper/swiper.min.css" type="text/css"/>
    <link rel="stylesheet" href="${base}/assets/js/component/upload/uploadfile.css" type="text/css"/>
    <link rel="stylesheet" href="${base}/assets/css/core.css">

    <link rel="stylesheet" href="${base}/assets/css/app.css">
    <script src="${base}/assets/plugins/jquery/dist/jquery.js"></script>
    <script src="${base}/assets/plugins/jquery-storage/jquery.storageapi.min.js"></script>
    <script src="${base}/assets/plugins/breakpoints/dist/breakpoints.min.js"></script>
    <script src="${base}/assets/plugins/jquery-slimscroll/jquery.slimscroll.js"></script>
    <script src="${base}/assets/plugins/bootstrap/js/bootstrap.min.js"></script>
    <script src="${base}/assets/plugins/jquery-pjax/jquery.pjax.js"></script>
    <script src="${base}/assets/plugins/jquery-validation/jquery.validate.min.js"></script>
    <script src="${base}/assets/plugins/jquery-validation/additional-methods.min.js"></script>
    <script src="${base}/assets/plugins/bootstrap-iconpicker/js/iconset-fontawesome-all.js"></script>
    <script src="${base}/assets/plugins/bootstrap-iconpicker/js/iconset-glyphicon-all.js"></script>
    <script src="${base}/assets/plugins/bootstrap-iconpicker/js/iconset-materialdesign-all.js"></script>
    <script src="${base}/assets/plugins/bootstrap-iconpicker/js/bootstrap-iconpicker.js"></script>
    <script src="${base}/assets/plugins/bootstrap-switch/js/bootstrap-switch.min.js"></script>
    <script src="${base}/assets/plugins/bootstrap-sweetalert/sweetalert.min.js"></script>
    <script src="${base}/assets/plugins/bootstrap-datepicker/js/bootstrap-datepicker.min.js"></script>
    <script src="${base}/assets/plugins/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js"></script>
    <script src="${base}/assets/plugins/toastr/toastr.min.js"></script>
    <script src="${base}/assets/plugins/zTree/js/jquery.ztree.all.js"></script>
    <script src="${base}/assets/plugins/art-template/template-web.js"></script>
    <script src="${base}/assets/plugins/alertify/alertify.min.js"></script>
    <script src="${base}/assets/plugins/icheck/icheck.min.js"></script>
    <script src="${base}/assets/plugins/multi-select/js/jquery.multi-select.js"></script>
    <script src="${base}/assets/plugins/summernote/summernote.js"></script>

    <script src="${base}/assets/plugins/summernote/lang/summernote-zh-CN.js"></script>
    <script src="${base}/assets/plugins/bootstrap-select/js/bootstrap-select.min.js"></script>
    <script src="${base}/assets/plugins/bootstrap-select/js/defaults-zh_CN.min.js"></script>
    <script src="${base}/assets/plugins/jquery-wizard/jquery-wizard.js"></script>

    <script src="${base}/assets/plugins/jquery-knob/jquery.knob.min.js"></script>
    <script src="${base}/assets/plugins/echarts/echarts.min.js" type="text/javascript"></script>

    <script type="text/javascript" src="${base}/assets/plugins/swiper/swiper.min.js"></script>
    <script type="text/javascript" src="${base}/assets/plugins/pinyinjs/JSPinyin.js"></script>
    <script type="text/javascript" src="${base}/assets/js/core.js"></script>
    <script type="text/javascript" src="${base}/assets/js/templete.js"></script>
    <script type="text/javascript" src="${base}/assets/js/basedrag.js"></script>
    <script type="text/javascript" src="${base}/assets/js/component/navtabs.js"></script>
    <script type="text/javascript" src="${base}/assets/js/component/dialog.js"></script>

    <script type="text/javascript" src="${base}/assets/js/component/datagrid.js"></script>
    <script type="text/javascript" src="${base}/assets/js/component/bolt_datagrid.js"></script>
    <script type="text/javascript" src="${base}/assets/js/component/message.zh-CN.js"></script>
    <script type="text/javascript" src="${base}/assets/js/component/ldSelect.js"></script>
    <script type="text/javascript" src="${base}/assets/js/component/extDatePicker.js"></script>
    <script type="text/javascript" src="${base}/assets/js/component/extiCheck.js"></script>
    <script type="text/javascript" src="${base}/assets/js/component/extSelectpicker.js"></script>
    <script type="text/javascript" src="${base}/assets/js/component/extSwitch.js"></script>
    <script type="text/javascript" src="${base}/assets/js/component/extMultiSelect.js"></script>
    <script type="text/javascript" src="${base}/assets/js/component/extBtnSearch.js"></script>
    <script type="text/javascript" src="${base}/assets/js/component/extSlimscroll.js"></script>
    <script type="text/javascript" src="${base}/assets/js/component/lookupField.js"></script>
    <script type="text/javascript" src="${base}/assets/js/component/extValidate.js"></script>
    <script type="text/javascript" src="${base}/assets/js/component/simple-edit-table.js"></script>
    <script type="text/javascript" src="${base}/assets/js/component/upload/uploadfile.js"></script>

    <script>
        var localTheme = localStorage.getItem('theme');
        if(localTheme){
            var changeArr = localTheme.split(',');
            changeTheme(changeArr);
        }
        else{
            $("head").append('<link class="display" rel="stylesheet" href="${base}/assets/css/display/header/header_blue.css">');
            $("head").append('<link class="display" rel="stylesheet" href="${base}/assets/css/display/menu/menu_black.css">');
        }
        function changeTheme(themeArr){
            var $link = $("head").find("link.display");
            localStorage.setItem('theme',themeArr);
            $link.each(function () {
                $(this).remove()
            });
            $("head").append('<link class="display" rel="stylesheet" href="${base}/assets/css/display/header/header_'+themeArr[1]+'.css">');
            $("head").append('<link class="display" rel="stylesheet" href="${base}/assets/css/display/menu/menu_'+themeArr[0]+'.css">');

        }
        Breakpoints();
    </script>
</head>
<body class="site-contabs-open site-menubar-unfold">

<nav class="site-navbar navbar navbar-default navbar-fixed-top navbar-inverse " user="navigation">
    <div class="navbar-header">
        <button type="button" class="navbar-toggle hamburger hamburger-close navbar-toggle-left hided" data-toggle="menubar">
            <span class="sr-only">切换菜单</span> <span class="hamburger-bar"></span>
        </button>
        <button type="button" class="navbar-toggle collapsed" data-target="#admui-navbarCollapse" data-toggle="collapse">
            <i class="icon wb-more-horizontal" aria-hidden="true"></i>
        </button>
    </div>
    <div class="navbar-container container-fluid">
        <div class="collapse navbar-collapse navbar-collapse-toolbar" id="admui-navbarCollapse">
            <ul class="nav navbar-toolbar navbar-left">
                <li class="hidden-float">
                    <a data-toggle="menubar" class="hidden-float" href="javascript:;" user="button" id="bolt-toggleMenubar">
                        <i class="icon hamburger hamburger-arrow-left">
                            <span class="sr-only">切换目录</span>
                            <span class="hamburger-bar"></span>
                        </i>
                    </a>
                </li>
                <li class="navbar-menu nav-tabs-horizontal nav-tabs-animate is-load" id="admui-navMenu">

                </li>
            </ul>
            <ul class="nav navbar-toolbar navbar-right navbar-toolbar-right">
                <li class="dropdown" id="admui-navbarMessage">
                    <a data-toggle="dropdown" href="javascript:;" class="msg-btn" aria-expanded="false" data-animation="scale-up" user="button">
                        <i class="icon wb-bell" aria-hidden="true"></i>
                        <span class="badge badge-danger up msg-num"></span>
                    </a>
                    <ul class="dropdown-menu dropdown-menu-right dropdown-menu-media" user="menu">
                        <li class="dropdown-menu-header" user="presentation">
                            <h5>最新消息</h5>
                            <span class="label label-round label-danger"></span>
                        </li>
                        <li class="list-group" user="presentation">
                            <div class="navbar-message-content" id="admui-messageContent" data-height="220px" data-plugin="slimScroll"></div>
                            <script type="text/html" id="admui-messageTpl">
                                {{if msgList.length < 1}}
                                <p class="text-center height-200 vertical-align">
                                    <small class="vertical-align-middle opacity-four">没有新消息</small>
                                </p>
                                {{else}}
                                {{each msgList}}
                                <a class="list-group-item" href="#"  data-message-id="{{$value.messageId}}" data-title="{{$value.title}}" data-content="{{$value.content}}" user="menuitem">
                                    <div class="media">
                                        <div class="media-left padding-right-10">
                                            <i class="icon {{$value.type | iconType}} white icon-circle" aria-hidden="true"></i>
                                        </div>
                                        <div class="media-body">
                                            <h6 class="media-heading">{{$value.title}}</h6>
                                            <time class="media-meta" datetime="{{$value.sendTime}}">
                                                {{$value.sendTime | timeMsg}}
                                            </time>
                                        </div>
                                    </div>
                                </a>{{/each}}
                                {{/if}}
                            </script>
                        </li>
                        <li class="dropdown-menu-footer" user="presentation">
                            <a href="/system/account/message" target="_blank" data-pjax>
                                <i class="icon fa-navicon"></i> 所有消息
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="hidden-xs" id="admui-navbarDisplay" data-toggle="tooltip" data-placement="bottom" title="设置主题与布局等">
                    <a class="icon wb-layout" href="/system/settings/display" target="_blank" data-pjax>
                        <span class="sr-only">主题与布局</span>
                    </a>
                </li>

                <li class="hidden-xs" id="admin-Fullscreen" data-toggle="tooltip" data-placement="bottom" title="全屏">
                    <a class="icon glyphicon glyphicon-fullscreen" data-toggle="fullscreen" href="#" user="button">
                        <span class="sr-only">全屏</span>
                    </a>
                </li>

                <li class="hidden-xs" id="admin-signOut"  data-toggle="tooltip" data-placement="bottom" title="退出">
                    <a class="icon fa-sign-out" href="#"  user="button">
                        <span class="sr-only">退出</span>
                    </a>
                </li>

            </ul>
        </div>
    </div>
</nav>
<nav class="site-menubar site-menubar-dark">
    <div class="site-menubar-body">
        <div class="app-user">
            <div class="media">
                <div class="media-left">
                    <div class="avatar avatar-md avatar-circle dropdown">
                        <a href="javascript:void(0)" data-options="{modalSize:'modal-lg',title:'上传头像',url:'${base}/admin/sys/user/userImageClip'}" data-toggle="dialog">
                            <img id="avatarImg" class="img-responsive" src="${base}/assets/images/206.jpg" alt="avatar"></a>
                    </div><!-- .avatar -->
                </div>
                <div class="media-body">
                    <div class="foldable">
                        <h5><a href="javascript:void(0)" class="username"><@shiro.principal property="userName"/></a></h5>
                        <ul>
                            <li class="dropdown">
                                <a href="javascript:void(0)" class="dropdown-toggle usertitle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                    <small></small>
                                    <span class="caret"></span>
                                </a>
                                <ul class="dropdown-menu animated flipInY">
                                    <li>
                                        <a class="text-color" href="#" onclick="Bolt.navtab('switchTab', 'main')">
                                            <span class="m-r-xs"><i class="fa fa-home"></i></span>
                                            <span>首页</span>
                                        </a>
                                    </li>
                                    <li>
                                        <a class="text-color"
                                           href="#" data-toggle="dialog"
                                           data-options="{url:'${base}/admin/pub/password/reset'}">
                                            <span class="m-r-xs"><i class="fa fa-user"></i></span>
                                            <span>个人设置</span>
                                        </a>
                                    </li>

                                    <li user="separator" class="divider"></li>
                                    <li>
                                        <a class="text-color" href="${base}/logout">
                                            <span class="m-r-xs"><i class="fa fa-power-off"></i></span>
                                            <span>退出</span>
                                        </a>
                                    </li>
                                </ul>
                            </li>
                        </ul>
                    </div>
                </div><!-- .media-body -->
            </div><!-- .media -->
        </div>
        <div class="tab-content height-full" id="menubar">

            <!-- 一级菜单 -->
            <div class="tab-pane animation-fade height-full active">
                <div>
                    <ul class="site-menu" >
                        <script id="rootMenu" type="text/html">
                            {{each data as value index}}
                            <li class="site-menu-item has-sub ">
                                <a href="javascript:;" class="submenu-toggle">
                                    <i class="site-menu-icon {{value.icon}}" aria-hidden="true"></i>
                                    <span class="site-menu-title">{{value.title}}</span><span class="site-menu-arrow"></span></a>
                                <ul class="site-menu-sub" style="">
                                    {{each value.children as submenu index}}
                                    <li class="site-menu-item  is-shown">
                                        <a data-toggle="navtab"  data-options="{id:'{{submenu.id}}',title:'{{submenu.title}}'}" href="${base}{{submenu.url}}" target="_blank">
                                            <span class="site-menu-title">{{submenu.title}}</span>
                                        </a>
                                    </li>
                                    {{/each}}
                                </ul>
                            </li>
                            {{/each}}
                        </script>
                    </ul>
                </div>
            </div>

            <!-- 一级菜单 -->
        </div>
    </div>
</nav>
<nav class="site-contabs"  id="bolt-navtab">
    <button type="button" class="btn btn-icon btn-default pull-left hide">
        <i class="icon fa-angle-double-left"></i>
    </button>
    <div class="contabs-scroll pull-left">
        <ul class="nav con-tabs">
            <li class="active" data-url="/admin/sys/code_generator" data-isOpen="true">
                <a href="javascript:void(0)"  target="tab-0" rel="contents"><span>首页</span></a>
            </li>
        </ul>
    </div>
    <div class="btn-group pull-right">
        <button type="button" class="btn btn-icon btn-default hide">
            <i class="icon fa-angle-double-right"></i>
        </button>
        <button type="button" class="btn btn-default dropdown-toggle btn-outline" data-toggle="dropdown" aria-expanded="false">
            <span class="caret"></span> <span class="sr-only">切换菜单</span>
        </button>
        <ul class="dropdown-menu dropdown-menu-right" aria-labelledby="conTabsDropdown" user="menu">
            <li class="reload-page" user="presentation">
                <a href="javascript:;" user="menuitem"><i class="icon wb-reload"></i> 刷新当前</a>
            </li>
            <li class="close-other" user="presentation">
                <a href="javascript:;" user="menuitem"><i class="icon wb-close"></i> 关闭其他</a>
            </li>
            <li class="close-all" user="presentation">
                <a href="javascript:;" user="menuitem"><i class="icon wb-power"></i> 关闭所有</a>
            </li>
        </ul>
    </div>
</nav>

<main class="site-page">
    <div class="page-container" id="navtab-pageContent">

    </div>
</main>
<!-- 底部 -->
<footer class="site-footer">
    <div class="site-footer-legal"> &copy;hdsoft</div>
    <div class="site-footer-right"> 当前版本：v1.2.0 </div>
</footer>

</body>

<script src="${base}/assets/plugins/PACE/pace.min.js"></script>
<script src="${base}/assets/js/app.js"></script>

<script type="application/javascript">

    var rootMenus =  <@authMenu />

    var html = template('rootMenu', {data: rootMenus});

    $('.site-menu').html(html);
</script>

</html>